import type { IRoute } from 'umi';

export const routes: IRoute[] = [
  {
    path: '/login&register', // 首页
    component: '@/pages/HomePage',
    title: '四季养生首页',
  },
  {
    path: '/register&revise', // 注册
    component: '@/pages/MerchantRegistered',
    title: '四季养生首页',
  },
  {
    path: '/changeInformation', // 修改个人信息
    component: '@/pages/MerchantRegistered',
    title: '修改个人信息',
  },
  {
    path: '/', // 首页
    component: '@/pages/ShopPage',
    title: '四季养生购物',
  },
  {
    path: '/goodsPage', // 商品浏览页
    component: '@/pages/GoodsPage',
    title: '四季养生购物',
  },
  {
    path: '/shopCar', // 购物车
    component: '@/pages/ShopCar',
    title: '我的购物车',
  },
  {
    path: '/streamPage', // 订单
    component: '@/pages/StreamPage',
    title: '已买到的宝贝',
  },
  {
    path: '/commodity', // 商品详情页
    component: '@/pages/Commodity',
    title: '商品详情',
  },
  {
    path: '/saleone', // 店铺页面
    component: '@/pages/SaleOne',
    title: '店铺',
  },
  {
    path: '/advice', // 养生资讯
    component: '@/pages/Advice',
    title: '养生资讯',
  },
  {
    path: '/write', // 文章详情
    component: '@/pages/Write',
    title: '文章详情',
  },
  {
    path: '/back', // 商家/管理员后台首页数据浏览
    component: '@/pages/BackPages/BackHomePage',
    title: '数据浏览',
  },
  // 后台管理（商家）
  {
    path: '/ordermanage', // 订单管理
    component: '@/pages/BackPages/Sale/OrderManage',
    title: '订单管理',
  },
  {
    path: '/creategoods',
    component: '@/pages/BackPages/Sale/CreateGoods',
    title: '新增商品',
  },
  {
    path: '/goodsmanage', // 商品管理
    component: '@/pages/BackPages/Sale/GoodsManage',
    title: '商品管理',
  },
  {
    path: '/goodsRecord',
    component: '@/pages/BackPages/Sale/GoodsRecord',
    title: '入库记录',
  },
  {
    path: '/goodsout',
    component: '@/pages/BackPages/Sale/GoodsOut',
    title: '出库记录',
  },
  {
    path: '/assessment',
    component: '@/pages/BackPages/Sale/Assessment',
    title: '评价管理',
  },
  // 后台管理（管理员）
  {
    path: '/moneydetail',
    component: '@/pages/BackPages/Manage/MoneyDetail',
    title: '进账明细',
  },
  {
    path: '/review-business',
    component: '@/pages/BackPages/Manage/ReviewBusiness',
    title: '审批商家',
  },
  {
    path: '/preferential',
    component: '@/pages/BackPages/Manage/Preferential',
    title: '优惠活动',
  },
  {
    path: '/ads', // 广告投放
    component: '@/pages/BackPages/Manage/PostAds',
    title: '广告投放',
  },
  {
    path: '/notice', // 资讯管理
    component: '@/pages/BackPages/Manage/Notice',
    title: '资讯管理',
  },
  {
    path: '/addAdvice', // 新增资讯
    component: '@/pages/BackPages/Manage/AddAdvice',
    title: '新增资讯',
  },
  {
    path: '/sales', // 商家管理
    component: '@/pages/BackPages/Manage/Sales',
    title: '商家管理',
  },
  {
    path: '/users', // 买家管理
    component: '@/pages/BackPages/Manage/Users',
    title: '买家管理',
  },
  {
    path: '/bannedPost', // 禁言管理
    component: '@/pages/BackPages/Manage/BannedPost',
    title: '禁言管理',
  },
  {
    path: '/test', // 禁言管理
    component: '@/pages/AAAAATest',
    title: '禁言管理',
  },
  {
    component: './404',
  },
];
